package com.itheima.api_date.calendar;

import java.util.Calendar;
import java.util.Date;

/**
 * @author Anomaly
 * @date 2022/12/29 16:45
 */
public class CalendarDemo {
    public static void main(String[] args) {
        Calendar instance = Calendar.getInstance();

        System.out.println(instance);
        System.out.println(instance.get(Calendar.YEAR));
        System.out.println(instance.get(Calendar.MONTH));
        System.out.println(instance.get(Calendar.DAY_OF_YEAR));

        Date time = instance.getTime();
        System.out.println(time);
    }
}
